import { z } from "zod";

/**
 * 获取分页查询Zod对象
 */
export const PageInfoQueryZod = z.object({
  currentPage: z.number(),
  pageSize: z.number(),
})

/**
 * 获取分页响应Zod对象
 */
export function PageInfoResultZod<T extends z.AnyZodObject>(item: T) {
  return z.object({
    currentPage: z.number(),
    pageSize: z.number(),
    totalCount: z.number(),
    list: z.array(item),
  })
}
